#include "Sa2dDom.h"

	shape::shape(){
		mygeometry = new geometry();
		myposition = new position();
		myrotation = new rotation();
	}

	double shape::getElasticity()
    {
        return elasticity;
    }

    double shape::getFriction()
    {
        return friction;
    }

    geometry *shape::getGeometry()
    {
        return mygeometry;
    }

    position *shape::getPosition()
    {
        return myposition;
    }

    rotation *shape::getRotation()
    {
        return myrotation;
    }

    string shape::getName()
    {
        return name;
    }

    double shape::getSurface_speed()
    {
        return surface_speed;
    }

    void shape::setElasticity(double elasticity)
    {
        this->elasticity = elasticity;
    }

    void shape::setFriction(double friction)
    {
        this->friction = friction;
    }

    void shape::setGeometry(geometry *mygeometry)
    {
        this->mygeometry = mygeometry;
    }

    void shape::setPosition(position *myposition)
    {
        this->myposition = myposition;
    }

    void shape::setRotation(rotation *myrotation)
    {
        this->myrotation = myrotation;
    }

    void shape::setName(string name)
    {
        this->name = name;
    }

    void shape::setSurface_speed(double surface_speed)
    {
        this->surface_speed = surface_speed;
    }

    string shape::toString(int indent) {
	string tabs = this->getIndent(indent);
	stringstream returnString;

	returnString << tabs << "Shape:\n";
	returnString << tabs << "name: " << getName() << "\n";
	returnString << tabs << "elasticity: " << getElasticity() << "\n";
	returnString << tabs << "friction: " << getFriction() << "\n";
	returnString << tabs << "surface speed: " << getSurface_speed() << "\n";
	returnString << myrotation->toString(indent+1)<<"\n";
	returnString << myposition->toString(indent+1)<<"\n";
	returnString << mygeometry->toString(indent+1)<<"\n";

	return returnString.str();
}
